import request from '@/utils/request'

//字典类型
//查询
export function dictTypeList(data) {
	return request({
		url: '/admin/dict/dictTypeList',
		method: 'get',
		params: data
	})
}

//新增
export function addDictType(data) {
	return request({
		url: '/admin/dict/addDictType',
		method: 'post',
		data
	})
}

//修改
export function updateDictType(data) {
	return request({
		url: '/admin/dict/updateDictType',
		method: 'post',
		data
	})
}

//删除
export function deleteDictType(data) {
	return request({
		url: '/admin/dict/deleteDictType',
		method: 'post',
		params: data
	})
}

//字典详情
//查询
export function dictDataList(data) {
	return request({
		url: '/admin/dict/dictDataList',
		method: 'get',
		params: data
	})
}

//新增
export function addDictData(data) {
	return request({
		url: '/admin/dict/addDictData',
		method: 'post',
		data
	})
}

//修改
export function updateDictData(data) {
	return request({
		url: '/admin/dict/updateDictData',
		method: 'post',
		data
	})
}

//删除
export function deleteDictData(data) {
	return request({
		url: '/admin/dict/deleteDictData',
		method: 'post',
		params: data
	})
}

//通过类型查询对应下拉框数据
export function dictDataSelect(data) {
	return request({
		url: '/admin/dict/dictDataSelect',
		method: 'get',
		params: data
	})
}